home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 26
/
Cream of the Crop 26.iso
/
os2
/
upchk71f.zip
/
ADVANCED.BAT
next >
Wrap
DOS Batch File
|
1997-01-10
|
2KB
|
75 lines
@ECHO OFF
rem !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
rem !! This batch file is not required for normal usage of UpCheck !!
rem !! !!
rem !! This is the advanced batch file that will include inserting !!
rem !! comments into any of the support archive types (if keep original !!
rem !! name is turned on) !!
rem !! !!
rem !! UpUtils /R will return an errorlevel depending on archive type !!
rem !! 1=ARC 2=ARJ 3=LHA 4=LZH 5=PAK 6=ZIP 7=ZOO 8=SQZ 9=UC2 !!
rem !! 13=EXE 14=GIF 15=JPG 16=??? !!
rem !! !!
rem !! UpUtils /E will return the errorlevel specified !!
rem !! !!
rem !! Remember that you must pass this file two parameters, the first !!
rem !! being the dropfile (ie DOOR.SYS) and the second being the archive !!
rem !! !!
rem !! Example for RA: *C /C C:\RA\UPCHECK\ADVANCED.BAT C:\RA\DOOR.SYS @ !!
rem !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
rem *** Change to the UpCheck directory
CD \RA\DOORS\UPCHECK
rem *** Run UpCheck, passing drop file and archive file
UPCHECK %1 %2
rem *** Was there an error?
IF ERRORLEVEL 1 GOTO :FAIL
:PASS
UPUTILS /REPORT %2
IF ERRORLEVEL 8 GOTO :PASSSQZ
IF ERRORLEVEL 2 GOTO :PASSARJ
GOTO :PASSEND
:PASSSQZ
SQZ c %2 C:\BBS\COMMENT.TXT
GOTO :PASSEND
:PASSARJ
ARJ c %2 -zC:\BBS\COMMENT.TXT
GOTO :PASSEND
:FAIL
UPUTILS /REPORT %2
IF ERRORLEVEL 8 GOTO :FAILSQZ
IF ERRORLEVEL 6 GOTO :FAILZIP
IF ERRORLEVEL 2 GOTO :FAILARJ
GOTO :FAILEND
:FAILSQZ
SQZ c %2 C:\BBS\COMMENT.TXT
GOTO :FAILEND
:FAILZIP
PKZIP %2 -z < C:\BBS\COMMENT.TXT
GOTO :FAILEND
:FAILARJ
ARJ c %2 -zC:\BBS\COMMENT.TXT
GOTO :FAILEND
:FAILEND
rem *** Return a Non-Zero to tell the BBS the file failed
UPUTILS /ERRORLEVEL 1
GOTO :END
:PASSEND
rem *** Return a Zero to tell the BBS the file passed
UPUTILS /ERRORLEVEL 0
GOTO :END
:END